<?php   
   include('server/utility.php');
   include('simple_html_dom.php');   
   $htmla = file_get_html('http://treno.site11.com/orariAl.php?stazIn=Treviglio&stazOut=Milano+Centrale&gg=16&mm=05&aa=2013&hh=10&min=51&nreq=10');
   $pos  = strrpos($htmla, '"stato":0');
   $pos2 = strrpos($htmla, 'TREVIGL');
   $stato = false;
   $testoa='';
   if ($pos === false || $pos2 === false) {
     $stato = true;
     $testoa='<div><h1>Problemi con orari php</h1></div><div>'.$htmla.'</div><br>------------------<br>';
   }
   $htmla->clear();
   $htmlb = file_get_html('http://treno.site11.com/dettagliAl.php?nTreno=2094');
   $pos  = strrpos($htmlb, '"stato":0');
   $pos2 = strrpos($htmlb, 'BRESCIA');
   $stato2 = false;
   $testob='';
   if ($pos === false || $pos2 === false){ 
     $stato2 = true;
     $testob='<div><h1>Problemi con dettagli php</h1></div><div>'.$htmlb;
   }
   $htmlb->clear();   
   if ($stato || $stato2)
    	sendMail('easytrainapp@gmail.com', "Problemi su server treno site11 ", $testoa.$testob); 
    file_get_html('http://treno.site11.com/news.php');
    file_get_html('http://treno.it.hostinghood.com/news.php');
?>